/*
 * Copyright 2011 Fabian Wenzelmann
 * 
 * This file is part of Recognition-Procedures-for-Boolean-Functions.
 * 
 * Recognition-Procedures-for-Boolean-Functions is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * Recognition-Procedures-for-Boolean-Functions is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with Recognition-Procedures-for-Boolean-Functions.  If not, see <http://www.gnu.org/licenses/>.
 */

package de.wenzelmf.booleanFunction.lpb.combinatorial.solver;

import de.wenzelmf.booleanFunction.lpb.combinatorial.splittingTree.SplittingTree;
import de.wenzelmf.booleanFunction.util.IntegerValue;

/**
 * This interface provides a method to choose a coefficient given the required max and min values.
 * 
 * @author Fabian Wenzelmann
 * @version 1.0
 *
 */
public interface CoefficientChooser
{
	/**
	 * Choose the coefficient a<sub>k</sub> s.t. a &lt; a<sub>k</sub> &lt; b if possible.
	 * 
	 * @param a The first integer value.
	 * @param b The second integer value.
	 * @param t The tree that contains some context information you may use.
	 * @param k The coefficient index (1 &le; k &le; m).
	 * 
	 * @return A feasible value for the coefficient a<sub>k</sub>.
	 * 
	 * @throws CoefficientSelectionException If it is not possible to choose a value for
	 * a<sub>k</sub>.
	 */
	public int chooseCoefficient(IntegerValue a, IntegerValue b, SplittingTree t, int k) throws CoefficientSelectionException;
	
}
